home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
Jogos de Azar
/
1721-apuesten.swf
/
scripts
/
C_VoiceButtonCLASS.as
< prev
Wrap
Text File
|
2006-01-17
|
1KB
|
66 lines
_global.C_VoiceButtonCLASS = function()
{
this.voiceOn = true;
};
C_VoiceButtonCLASS.prototype = new MovieClip();
C_VoiceButtonCLASS.prototype.onLoad = function()
{
this.a_btn.addAlt(function()
{
if(this._parent.voiceOn)
{
this.showAlt("Turn dealer voice OFF");
}
else
{
this.showAlt("Turn dealer voice ON");
}
}
,function()
{
this.hideAlt();
}
);
this.a_btn.onPress = function()
{
this.hideAlt();
this._parent.onButtonPress();
};
this.a_btn.useHandCursor = true;
};
C_VoiceButtonCLASS.prototype.lock = function()
{
this.onRelease = function()
{
};
this.useHandCursor = false;
};
C_VoiceButtonCLASS.prototype.unlock = function()
{
delete this.onRelease;
delete this.useHandCursor;
};
C_VoiceButtonCLASS.prototype.onButtonPress = function()
{
if(this.voiceOn)
{
this.voiceOn = false;
this.a_btn._brightness = -50;
this.label_mc._brightness = -50;
}
else
{
this.voiceOn = true;
this.a_btn._brightness = 0;
this.label_mc._brightness = 0;
}
var c = this.client;
c.client[c.handler](this.voiceOn);
};
C_VoiceButtonCLASS.prototype.setChangeHandler = function(handler, client)
{
this.client = {client:client,handler:handler};
};
ASSetPropFlags(_global,"C_VoiceButtonCLASS",131);
Object.registerClass("C_VoiceButtonCLASS",C_VoiceButtonCLASS);